import request from "@/plugins/axios"


/**
 * 分页查询
 * @param data
 * @param pageNum
 * @returns {*}
 */
export function getPage(data,pageNum){
    return request({
        url:"sales/orders/getPage?pageNum="+pageNum,
        method:"POST",
        data:data,
    })
}

export  function getCustomers(){
    return request({
        url:"sales/orders/getCustomers",
        method:"GET",
    })
}

export function listProducts(){
    return request({
        url:"sales/orders/getProducts",
        method:"GET",
    })
}

export function updateOrders(data){
    return request({
        url:"sales/orders",
        method:"PUT",
        data:data
    })
}
export function addOrders(data){
    return request({
        url:"sales/orders",
        method:"POST",
        data:data
    })
}

export function getOrders(orderId){
    return request({
        url: 'sales/orders/' + orderId,
        method: 'get'
    })
}

export function delOrders(ids){
    return request({
        url: 'sales/orders/' + ids,
        method: 'delete'
    })
}

export function getCarriers(){
    return request({
        url: 'sales/orders/getCarriers',
        method: 'get'
    })
}